#pragma once
#include "matrix.h"
#include "ScreenSolution.h"

enum Direction { LEFT, RIGHT, UP, DOWN, FORWARD, BACKWARD };
const float k_Pi = 3.14159265359f;

class Camera
{
private:
	Vector3 m_position;
	GLfloat m_angleX, m_angleY, m_angleZ;
	GLfloat m_near, m_far, m_fovY, m_aspect; 
	GLfloat m_speed;
	Matrix m_projectMatrix;
	char m_id[MAX];

public:
	Camera(void);
	virtual ~Camera(void);
	void MoveCamera(Direction dir);
	void RotateCamera(Direction dir);
	void Init(const char * id, const Vector3 & pos, GLfloat fovY, GLfloat aspect, GLfloat nearPlane, GLfloat farPlane, GLfloat speed);
	void Update();
	Matrix CalculateVPMatrix();
	Matrix CalculateWorldMatrix();

	// Setters
	void SetPosition(const Vector3 & pos);
	void SetSpeed(const GLfloat & speed);
	void SetProjectMatrix(GLfloat fovY, GLfloat aspect, GLfloat nearPlane, GLfloat farPlane);

	// Getters
	Vector3 & GetPosition();
	const char* GetId();
};
